function Ajax(url, data, type) {
  return new Promise((resolve) => {
    $.ajax({
      url,
      data,
      traditional: true,
      dataType: 'json',
      type,
      success: res => {
        resolve(res);
      }
    })
  })
}


